Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@root/pages/Login'),
  },
  { // 不能和login顺序反转
    path: '/*',
    name: 'Root',
    component: () => import('@root/pages/Root'),
  }
]

const router = new VueRouter({
  mode: 'hash',
  routes,
})

Vue.prototype.$myRouter = router

export default router
